package oop;

/**
 * @author: knowno
 * @create: 2025-09-11 09:14
 * @Version 1.0
 **/
public class Movie {
    private String name; //名称
    private int time; //时长
    private String director;//导演
    private String actor;//演员
    private String type;//类型
    private double score;//评分
    private String country;//国家
    private String language;//语言
    private String summary;//摘要,简介

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        if (time<=0){
            System.out.println("时长不能小于等于0");
            return;
        }
        this.time = time;
    }

    public String getDirector() {
        return director;
    }

    public void setDirector(String director) {
        this.director = director;
    }

    public String getActor() {
        return actor;
    }

    public void setActor(String actor) {
        this.actor = actor;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    /**
     * 写,设置摘要名称
     * @param summary
     */
    public void setSummary(String summary) {
        this.summary = summary;
    }

    /**
     * 读,获取摘要名称
     * @return
     */
    public String getSummary() {
        return summary;
    }

    public Movie() {
    }

    public Movie(String name, int time, String director, String actor, String type, double score, String country, String language, String summary) {
        this.name = name;
        this.time = time;
        this.director = director;
        this.actor = actor;
        this.type = type;
        this.score = score;
        this.country = country;
        this.language = language;
        this.summary = summary;
    }
    @Override
    public String toString() {
        return "Movie{" +
                "name='" + name + '\'' +
                ", time=" + time +
                ", director='" + director + '\'' +
                ", actor='" + actor + '\'' +
                ", type='" + type + '\'' +
                ", score=" + score +
                ", country='" + country + '\'' +
                ", language='" + language + '\'' +
                ", summary='" + summary + '\'' +
                '}';
    }


}
